home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
ap100.arc
/
AUTOPUMA.DOC
< prev
next >
Wrap
Text File
|
1991-04-28
|
26KB
|
727 lines
Page 1
WHAT IS AUTOPUMA?
Autopuma is a script that adds a number of trivial abilities to Telix,
such as exiting or disconnecting if Telix has not been used,
displaying incoming bells to the screen, and automatically starting
MPt/Puma downloads when the host begins sending.
WHY IS AUTOPUMA?
Originally this script simply started Puma downloads anytime the Puma
string was sent by the host, as Telix already does with Zmodem (hence
the name, which I have never bothered to change). But I also have a
small BBS on the same machine that I use for downloads. Often I would
start a download from another BBS then have to leave before the
download finished. I'd either have to abort the download to bring up
the BBS, or leave with the download still going, and wait until I got
back to bring up the BBS. I had some kluges to bring up the board
when the download finished, but they required I remember to trigger
them before I started the download.
Since I already had this script running "in the background" all the
time anyway, I added the ability to monitor activity and bring up the
BBS after Telix was left unattended for some amount of time. Then I
though it'd be nice if Telix brought up the board for an incoming
call. I gave it to a friend who asked for a few more things, then I
needed more things...
FILES INCLUDED:
AUTOPUMA.SLC AUTOPUMA script ("resident" portion).
APTINY.SLC Small version of AUTOPUMA.
APCONFIG.SLC Configuration script.
APCTINY.SLC Small version of APCONFIG.
WHO.SLC Tells who current/last connection was to.
PUMAXMT.SLC Puma/MPt upload script.
PUMARCV.SLC Puma/MPt download script.
PUMAXMT.SLT PUMAXMT.SLC source script.
PUMARCV.SLT PUMARCV.SLC source script.
AUTOPUMA.DOC This file.
AUTOPUMA.WP5 WordPerfect 5.1 version of this file.
The difference between the large and small versions is where the code
for AUTOPUMA's configuration window resides. This code takes up about
22K of RAM and placing it in the "resident" part of AUTOPUMA takes up
memory you may need for other things such as DOS shells. Moving it
out of the resident portion into the more transient configuration
script saves memory, but the configuration script takes a few seconds
longer to load.
Page 2
Which version of AUTOPUMA and the configuration script you use is up
to you. If you use the small version of AUTOPUMA, which does not have
the configuration window code, you must use the LARGE version of
APCONFIG (which does) to bring up the configuration window. With the
large version of AUTOPUMA, the small version of the config script is
all that's needed (although the large one will work as well).
INSTALLATION:
Choose the version of AUTOPUMA.SLC and APCONFIG.SLC you want to use,
and copy them to the same directory as your other Telix scripts. If
you use the small version of Autopuma rename it to AUTOPUMA.SLC. If
you've never used scripts before, press ALT-O from Telix and select
"Filenames and paths." Select "C" and enter the directory you want to
keep scripts in. Make sure you save it ("Write setup to disk") then
get back to DOS and copy the appropriate versions of AUTOPUMA.SLC and
APCONFIG.SLC to that directory.
If you want Autopuma to run every time you run Telix, make a batch
file (for instance "TLX.BAT") that contains:
TELIX SAUTOPUMA
and run this batch file instead of TELIX.EXE. To take advantage of
some Autopuma features you may eventually need to run Telix from a
batch file anyway. More on this later.
You may also want to define a key combination to run the configuration
script. Press "ALT-K", select <R>egular key table, <E>dit, then
choose a key combination (I use ALT-N), and define it as:
@APCONFIG
or "@APCTINY" if you use the small version of the configuration
script.
USING AUTOPUMA:
Run Autopuma, either from the DOS command line with:
TELIX SAUTOPUMA
or from within Telix by pressing ALT-G and giving AUTOPUMA as the
script to run.
Run the configuration script (APCONFIG) with ALT-G from within Telix.
This will bring up a window with Autopuma's available options.
Options are:
A - If phone rings once exit with....... 0
Page 3
If this is set to a non-0 value, and "RING" is received from the modem
when there is no carrier, Autopuma will exit Telix with that
errorlevel. A batch file can use the errorlevel to bring up a BBS, or
some other software to handle incoming calls.
B - If phone rings twice exit with...... 0
If this is set to a non-0 value, Autopuma will wait for two rings to
come in from the modem, then exit from Telix with that errorlevel. If
a second ring does not come in within 7 seconds of the first then
Telix will exit with the errorlevel given in option A if it has been
set.
C - Exit on inactivity.................. After 20:00 with 100
If the time limit is not 0 and Telix detects no local or comm port
activity within that time it will exit with given errorlevel.
D - Time out even if carrier present?... No
Usually Autopuma considers an active carrier as activity, and will not
exit Telix if one is present even if nothing else is going on. If
this option is set to Yes, an active carrier alone will not be
considered activity, and Autopuma will exit Telix and hang up on an
active connection if nothing is received from the host and no local
activity is detected within the time limit given in option C.
E - Hang up if no activity for.......... 0:00
If this is set to a non-0 value and no activity occurs within that
time, Autopuma will drop any active carrier.
F - Exit Telix on carrier loss.......... Off
Once, with 100
Always, with 100
This will cause Telix to exit with the given errorlevel when the
carrier is lost. I use this when I start a download and I know I
won't be around when it finishes to bring up the BBS (most decent
BBSes can be told to hang up after a transfer). If the option is set
to "Once" and the exit is canceled, it will not reset, and the next
time a carrier drops Telix will not exit. If set to "Always" and the
exit is canceled the option will reset, wait for another carrier, then
try to exit again when it drops.
G - Letter for MPT/Puma protocol........ P
This is the letter you have assigned to the Puma protocol in the Telix
"File transfer protocols" configuration. If this is set and "Zmodem
auto-downloads" is enabled in Telix, Autopuma will then begin a
receive with this protocol when a ^VPuma^V or ^VMPt^V string is
received.
Page 4
H - User defined string................. [none]
This can be any string that, when received by Telix, should trigger
some action.
I - User defined command................ [none]
This is the action that the user-defined string will trigger. The
available options are:
EXIT [errorlevel] Exits Telix with the errorlevel
HANGUP Hangs up the phone
SEND [text] Sends text out the comm port
LOAD [file] Loads a configuration file
SCRIPT [script] Runs a SALT script
DOS [command] Runs a DOS command in a sub-shell
Anything else is considered a DOS command and will be executed from a
sub-shell.
J - Visual bells........................ Off
Always, 0.5 seconds
If no sound, 0.5 seconds
Autopuma can display "BELL!" in the center of the screen for a user-
selectable duration anytime a bell is received. Useful for
environments where silence is required, but you still want to know
about beeps.
K - Seconds to delay before exit........ 0:10
In most situations that trigger an exit from Telix, Autopuma will
display a countdown timer before exiting to allow a chance to abort.
This sets the length of the delay.
L - Show timer or clock on status line.. Neither
Timer
Clock Always
Clock if no Timer
If Telix status bar is enabled, Autopuma can display either the clock
time or the length of time Telix has been inactive in the area that
usually displays the script name. "Timer" displays the timer if it's
relevant, otherwise the script name. "Clock Always" displays the
current time. "Clock if no Timer" will display the timer if relevant,
otherwise the current time is displayed.
M - Change Autopuma colors
This allows you to set the colors Autopuma uses to display the
configuration window. The item to color is selected with up/down
arrow, tab/shift tab, or home/end. Colors are selected with
Page 5
left/right arrow or the first letter of the color. The sample box
will show what the colors will look like. Selecting "Set to saved
Telix colors" will set the colors to whatever was last saved in Telix
"Screen and color" menu.
N - Load options from disk.............. AUTOPUMA.CNF
This allows you to recall previously saved Autopuma configurations
from a saved file.
O - Save options to disk................ AUTOPUMA.CNF
This will save the current Autopuma settings to a disk file.
P - Unload Autopuma
This removes Autopuma from memory
To be useful, any option that forces Telix to exit with an errorlevel
requires Telix to be run from a batch file that uses the "if
errorlevel" command to test the errorlevel and perform the appropriate
action. For instance, if you want Telix to bring up a BBS if a call
comes in, you need to set "A - If phone rings once exit with......" to
a non-0 value (say, 100) and run Telix from a batch file that looks
like this:
rem run Telix with AUTOPUMA
telix sautopuma
rem if returned 100 run command to start BBS ("board" in this case)
if errorlevel 100 board
ENTERING VALUES IN THE CONFIG WINDOW:
Values used as errorlevels cannot exceed 255. Times cannot exceed
99:59:59.
If you need to enter characters into string values that are usually
special (i.e. ENTER or ESC), press CTRL-V or CTRL-P, then the
character. Characters that must be entered this way are ENTER, ESC,
all CTRL characters and any ANSI "ALT<number>" code. The following
keys perform these functions:
ENTER: save changes and quit editing
ESC: lose changes and quit editing
Right arrow/CTRL-D: right one position
Left arrow/CTRL-S: left one position
CTRL-right/CTRL-F: right one word
CTRL-left/CTRL-A: left one word
HOME: beginning of string
END: end of string
DEL: delete character at cursor
Backspace: delete character left of cursor
Page 6
CTRL-DEL: delete from cursor to end of word
CTRL-Backspace: delete from beginning of word to cursor
CTRL-END: delete from cursor to end of line
CTRL-HOME: delete from beginning of line to cursor
INSERT: toggle insert mode
CTRL-P/CTRL-V: insert special character
CTRL-Y: clear entire line
CTRL-U: undo all changes
For numeric and time values:
Grey '+': increment value by one
Grey '-': decrement value by one
For time values
CTRL-Grey '+': increment by one minute
CTRL-Grey '-': decrement by one minute
ALT-Grey '+': increment by one hour
ALT-Grey '-': decrement by one hour
CONFIGURING VIA THE ENVIRONMENT:
Autopuma can also be configured partially or entirely through the
environment rather than a disk file. The variable AUTOPUMA can be set
to a string of options that tell Autopuma what to do. The easiest way
to create the configuration string is to configure Autopuma through
the configuration window, save the configuration to a file, then copy
the configuration file into your batch file (or wherever). The config
file is formatted as SET AUTOPUMA=<config string> to allow just that.
If you want to edit or create the string yourself, the format is:
SET AUTOPUMA=[option[:arg1][,arg2]...]...
Options and their arguments are:
R1X:<errorlevel>
<errorlevel> is the errorlevel Telix should exit with when one
ring is received.
R2X:<errorlevel>
<errorlevel> is the errorlevel Telix should exit with when two
rings are received.
TOT:<time>,<errorlevel>
<time> is the length of inactivity after which Autopuma will
force Telix to exit. <Errorlevel> is the errorlevel Telix will
exit with.
IC[:switch]
IC tells Autopuma to ignore a carrier. Autopuma will exit after
inactivity (if that option is set) whether a carrier is present
Page 7
or not. <switch> may be 0 (off) or 1 (on), or omitted, which is
assumed to be 1.
DCT:<time>
Sets amount of inactivity after which Autopuma will hang up on a
live connection.
ECL[:switch]
Tells Autopuma whether or not to exit when a carrier drops.
Switch can be:
0 - do not exit
1 - once
2 - always
If ECL is not followed by any value, 2 is assumed.
ECLX:<errorlevel>
<errorlevel> is the errorlevel Telix will return if it exits due
to a carrier drop.
PKEY:<letter>
<letter> is the letter that has been assigned to the Puma/MPt
protocol in Telix' "File transfer protocols" configuration.
UDS:<string>
<string> is the string that, if received by Telix, will cause the
user-defined string to be executed. The string can contain any
characters, but the following characters have special meaning to
Autopuma and must be quoted:
" (double quote)
' (single quote)
, (comma)
^ (caret)
(space)
Characters are quoted by either enclosing the character in double
or single quotes, or immediately preceding the character with a
caret (^). The string Enter name (i.e., "Joe Smith") contains
spaces, a comma, and quotes that must be quoted. This can be
done several ways:
'Enter name (i.e., "Joe Smith")'
<entire string in single quotes>
"Enter name (i.e., ^"Joe Smith^")"
<entire string in double quotes, with internal double quotes
preceded by carets>
Enter^ name^ (i.e.^,^ ^"Joe^ Smith^")
<all spaces, quotes, and comma preceded by carets>
Page 8
Control characters can be represented by a caret followed by a letter,
such as "^A" to represent CTRL-A. Characters above ASCII 127 must be
typed using ANSI.SYS' "ALT<keypad>" convention in an editor that
accepts high ASCII characters.
UDC:<string>
<string> is the command that will be executed if the user-defined
string is received by Telix. It's entered and quoted the same as
the user defined string.
VB[:switch]
Controls whether or not incoming bells are displayed. <switch>
can be:
0 - bells are not displayed
1 - bells are displayed only if sound is off
2 - bells are displayed whether sound is off or not.
If VB is not followed by any value, 1 is assumed.
DLY:<time>
<time> is the amount of time Autopuma will delay before exiting
from Telix.
ST:<switch>
Controls whether Autopuma displays the clock or timer on Telix'
status line. <switch> may be:
0 - display neither
1 - display timer if relevant; otherwise nothing
2 - display clock
3 - display timer if relevant; otherwise clock.
CLR:<border>,<text>,<highlight>,<inverse>
Sets the colors Autopuma uses to display the configuration
window.
<border> - Configuration window border
<text> - Normal configuration window text
<highlight> - Highlighted text
<inverse> - Inverse video
Each color is a number calculated as (foreground + background *
16). Color values are:
00 Black
01 Blue
02 Green
03 Cyan
04 Red
05 Magenta
06 Brown
07 Light grey
Page 9
08 Dark grey
09 Light blue
10 Light green
11 Light cyan
12 Light red
13 Light magenta
14 Yellow
15 White
Since most machines display background colors 8 or higher as
blinking versions of the lower colors, the color editor does not
allow them to be used as background colors (neither does Telix).
However no checks are done on numbers read from the configuration
file, so you can pick blinking colors this way if you want.
CFN:<filename>
This specifies the file from which Autopuma will read and write
configuration information. When this option is encountered in a
configuration string, Autopuma reads the contents of that file
and sets the configuration to it before continuing with the
original configuration information.
RENAMING AUTOPUMA
If you want to name the AUTOPUMA.SLC to something else you must
also set the environment variable APNAME to the new script name
to allow APCONFIG to get the current settings. Type at the
command line or add to your batch file:
SET APNAME=<name of autopuma script file>
PUMAXMT/PUMARCV.SLC
PUMAXMT.SLC and PUMARCV.SLC will perform Puma/MPT uploads. Both
scripts require either PUMA.EXE 1.00, or MPT.EXE 1.10 or greater.
These scripts should be installed in Telix "Protocol options" menu
like this:
Key Protocol Upload Download BAT or DL
Name Filename Filename Script Name
-------------------------------------------------------
P Puma/MPT pumaxmt pumarcv Script N
The scripts run the driver with options to make it behave according to
various Telix switches. For instance, if Telix sound is off, MPT
sound will be disabled. If Zmodem receive crash recovery is enabled,
MPT receive crash recovery will be enabled.
The WHO script:
Page 10
This is an unremarkable script that will tell you what entry in your
dialing directory you are currently connected to. However if AUTOPUMA
has been loaded WHO will also tell you who you were just connected to,
even if the connection has dropped. Telix does not store this
information once the connection is lost, but Autopuma does and WHO can
ask Autopuma for it. WHO also displays the information in Autopuma's
current colors.
DISCLAIMER:
AUTOPUMA is provided on an "as is" basis without warranty of any kind,
expressed or implied, including but not limited to the implied
warranties of merchantability and fitness for a particular purpose.
The person using the software bears all risk as to the quality and
performance of the software. Should the software prove defective, the
user assumes the entire cost of all necessary repair, servicing, or
correction. The author will not be liable for any special,
incidental, consequential, indirect or similar damages due to loss of
data or any other reason, even if the author or an agent of the
author has been advised of the possibility of such damages. In no
event shall the author's liability for any damages ever exceed the
price paid for the license to use the software, regardless of the form
of the claim.
ANYTHING ELSE?
There is no charge for private, non-commercial use of AUTOPUMA (but if
you send a check anyway it won't go uncashed). Comments, requests,
and suggestions for a better name for this script can be left at:
The Dead of Night BBS
(703) 644-7667
or mailed to:
Donald Mehrtens
5923 Minuteman Rd
Springfield VA 22152
or sent via CompuServe (which I don't check very often) to ID
72361,1407.
CAVEATS:
There is no direct way to test if a local key has been struck without
interfering with Telix's ability to process that key. However most
local Telix functions momentarily stop the script, and this can be
detected. This means individual keystrokes may not always register as
activity to Autopuma, but any local activity that takes more than a
Page 11
couple of seconds will register, and characters coming in from the
comm port will keep the timer resetting.
If using the tiny version of Autopuma while running Telix under
Windows, and the PIF file is set to "Detect Idle Time" Telix may take
excessively long to bring up the configuration window. On my Compaq
386/20 it takes upwards of 2 minutes. Make sure Detect Idle Time is
off or use the large version of Autopuma under Windows if you have
this problem.
ACKNOWLEDGEMENTS:
Thanks to Bob Price for his help and suggestions, and especially for
his fledgling SALT preprocessor (soon to be available to the rest of
the world!); To Lori Davis, for her help with this documentation (we
programmers don't speak good English); and to Colin Sampaleanu for a
great comm program.
SALT Authors, HELP!
Is there any way for a script to determine its own name, as DOS batch
files can do with %0 or C programs can do with argv[0]?
The script runs considerably slower if _scr_chk_key is set to 0 to
disable the ESC key from prompting to abort the script. Can anything
be done about this? Can the ESC key be prevented from aborting
scripts without using _scr_chk_key?
Is there any way to find out whether the cursor is on or off?
Is there a cleaner way to find out if the status bar is on than to
look on the screen for it with vgetchr/vgetstr?
Is there a way to see if a local key has been hit without destroying
the terminal() function's ability to process it, like cinp_count()
does with the comm port?
Despite the fact that Telix does not appear able to do anything with
them, CS will happily compile a script that has no main() function.
Is this of any use?
Can a script find out which dialing directory entries are marked? Can
a script mark and unmark entries?
And does ANYBODY know ANYTHING about Telix 4.0?